<?php

/**
 * News form.
 *
 * @package    vogue
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class NewsForm extends BaseNewsForm
{
    public function configure()
    {
  		  # WIDGETS
        $this->widgetSchema['title'] 	     = new sfWidgetFormInputText(array(), array());
        $this->widgetSchema['object_id']   = new sfWidgetFormInputHidden(array(), array('value'=>$this->getOption('object_id')));
        $choices = GlobalTools::getArray('object_type');
      	$this->widgetSchema['object_type'] = new sfWidgetFormChoice(array('choices'=>$choices), array());
      	$this->widgetSchema['summary']     = new sfWidgetFormTextarea(array(), array());
      	$this->widgetSchema['body']        = new sfWidgetFormTextarea(array(), array());
      	  	
      	#DEFAULTS
      	$this->setDefault('object_id', $this->getOption('object_id'));
        $this->setDefault('object_type',$this->getOption('object_type'));
        
      	# VALIDATORS
      	$this->validatorSchema['title']      = new sfValidatorString(array(), array());
      	$this->validatorSchema['object_id']  = new sfValidatorPass();
      	$this->validatorSchema['object_type']= new sfValidatorPass();
      	$this->validatorSchema['summary']    = new sfValidatorPass();
      	$this->validatorSchema['body']       = new sfValidatorPass();
      	
      	#HELP
    }

}